import django
from django.conf import settings
from django.conf.urls.defaults import patterns, include, url

# Uncomment the next two lines to enable the admin:
#from django.contrib import admin
#import exams
#admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root' : settings.MEDIA_ROOT}),
    url(r'^$', 'Educator3000.views.index', name='index'),
    url(r'^exams/$', 'exams.views.index', name='index'),
    url(r'^exams/(\d+)/(\d+)/', 'exams.views.show', name='show'),
    url(r'^exams/create/$', 'exams.views.create_exam2', name='create_exam2'),
    #url(r'^exams/create_ex/(\d+)', 'exams.views.create_ex', name='create_ex'),
    url(r'^exams/create_exam2/$', 'exams.views.create_exam2', name='create_exam2'),
    url(r'^exams/create_question2/(\d+)', 'exams.views.create_question2', name='create_question2'),
    #url(r'^exams/create_quest/(\d+)', 'exams.views.create_quest', name='create_quest'),
    #url(r'^exams/create/(\d+)', 'exams.views.create_question', name='create_question'),
    #url(r'^exams/create_question/(\d+)', 'exams.views.create_question', name='create_question'),
    #url(r'^exams/create_answer/(\d+)', 'exams.views.create_answer', name='create_answer'),
    url(r'^sandbox/$', 'exams.views.sandbox', name='sandbox'),
    url(r'^exams/ajax_test/$', 'exams.views.ajax_test', name='ajax_test'),
    url(r'^exams/post_test$', 'exams.views.post_test', name='post_test'),
    url(r'^exams/post_answer$', 'exams.views.post_answer', name='post_answer'),
    url(r'^exams/submit/(\d+)/(\d+)$', 'exams.views.submit_exam', name='submit_exam'),
    url(r'^exams/user/(\d+)/$', 'exams.views.my_exams', name='my_exams'),
    url(r'^exams/user/(\d+)/show/(\d+)', 'exams.views.show_user_exam', name='show_user_exam'),
    url(r'^exams/user/(\d+)/stats/(\d+)', 'exams.views.show_user_exam_stats', name='show_user_exam_stats'),
    url(r'^accounts/login/$','django.contrib.auth.views.login'),
    url(r'^accounts/logout$','django.contrib.auth.views.logout'),
    #url(r'^exams/(\d+)/show_results', 'exams.views.show_results', name='show_results'),
    # url(r'^Educator3000/', include('Educator3000.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    #url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    #url(r'^admin/', include(admin.site.urls)),


)

# url docl
# https://docs.djangoproject.com/en/dev/topics/http/urls/

# (regular expression, Python callback function [, optional dictionary])